<?php

namespace App\Models;

class GoodsLike extends BaseModel
{
    protected $table = 'goods_like';

    protected $fillable = [
        'user_id',
        'user_fid',
        'goods_id',
        'status',
    ];

    public function goods()
    {
        return $this->hasOne(Goods::class, 'id', 'goods_id')->select('id', 'title');
    }
    public function user()
    {
        return $this->hasOne(User::class, 'id', 'user_id')->select('id', 'nickname','avatar');
    }
}
